﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace AncientEmpires_025_132
{
    public class Castle : Building
    {
        
        public Castle(ContentManager content, string[] strTexture, NationName nationname, Vector2 position, Vector2 topleft, Vector2 size)
        {
            this.IncreaseMoney = 60;
            this.MyBuildingName = BuildingName.Castle;
            this.ListIndexCellUse = new List<Vector2>();
            this.ListSprites = new List<Sprite2D>();
            this.MyNationName = nationname;
            ListChangeColor = new List<ShareContent.PixelColor>();
            Texture2D[] texture = new Texture2D[strTexture.Length];
            for (int i = 0; i < strTexture.Length; i++)
            {
                texture[i] = content.Load<Texture2D>(strTexture[i]);
            }
            Sprite2D temp = new Sprite2D(texture, position, topleft);
            temp.Size = size;
            this.ListSprites.Add(temp);
            //SetColorAfterNation(new List<Color> { new Color(12, 72, 204), new Color(0, 20, 116), new Color(4, 40, 160), new Color(0, 4, 76) });
            
        }

        public override void SetListIndexCellUse(Vector2 indexLitmit, Vector2 indexMatrix, Vector2 multiple)
        {
            base.SetListIndexCellUse(indexLitmit, indexMatrix, multiple);
            this.ListIndexCellUse.RemoveAt(0);
        }
        public override void Update(GameTime gameTime)
        {
            UpdateMouseState();
            base.Update(gameTime);
        }
        
    }
}
